#include "NodeList.h"

NodeList::NodeList() {
	this->element = NULL;
	this->nextNode=NULL;
	this->prevNode=NULL;
}

NodeList::NodeList(TermYFrecQuery* term) {
	setElement(term);
	this->prevNode = NULL;
	this->nextNode = NULL;
}

NodeList::~NodeList() {
	this->element = NULL;
	this->nextNode = NULL;
	this->prevNode = NULL;
}

void NodeList::setElement(TermYFrecQuery* element){
	assert(element != NULL);
	this->element = element;
}

TermYFrecQuery* NodeList::getElement(){
	return this->element;
}

void NodeList::setNextNode(NodeList* nextNode){
	this->nextNode = nextNode;
}

NodeList* NodeList::getNextNode(){
	return this->nextNode;
}

void NodeList::setPrevNode(NodeList* prevNode){
	this->prevNode = prevNode;
}

NodeList* NodeList::getPrevNode(){
	return this->prevNode;
}

void NodeList::dispose() {
	delete(element);
}
